<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title> - 玩家管理</title>
	    <meta name="keywords" content="">
	    <meta name="description" content="">
	    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	    <link href="__STATIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
	    <link href="__STATIC__/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
	    <link href="__STATIC__/css/animate.css" rel="stylesheet">
	    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	    <link href="__STATIC__/css/new_file.css" rel="stylesheet">
	</head>
	<body class="gray-bg">
		<div class="wrapper wrapper-content  animated fadeInRight">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox ">
						<div class="ibox-title">
							<h5>玩家管理</h5>
						</div>
						<div class="toogl_body">
	                    	<a href="Gameplayer.html"><button type="button" class="btn btn-w-m btn-bt btn-info">玩家管理</button></a>
	                    	<a href="Gameplayer_1.html"><button type="button" class="btn btn-w-m btn-white btn-bt">操作记录</button></a>
							<div class="ibox-content ibox-jqGrid">
								<div class="form-group mmp-gbl"><br/>
	                                <label class="col-sm-2 control-dy">用户ID：</label>
	                                <div class="col-sm-8 form-time1">
	                                    <input type="text" placeholder="请输入用户id" class="form-control form-time-bk" id="uid" > 
	                                </div>
	                                <!--<label class="col-sm-2 control-dy">用户昵称：</label>-->
	                                <!--<div class="col-sm-8 form-time1">-->
	                                    <!--<input type="text" placeholder="请输入用户昵称" class="form-control form-time-bk" id="nickname" > -->
	                                <!--</div>-->
	                                <button type="button" class="btn btn-info" id="buttonid">查询</button>
	                            </div>
		                        <div class="jqGrid_wrapper">
		                            <table id="table_list_1"></table>
		                            <div id="pager_list_1"></div>
		                        </div>
		                    </div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 冻结   -->
		<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border float-pad">
								<div class="ibox-content">
									<form class="form-horizontal">
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户ID：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="freeze_id">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户昵称：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="freeze_nickname">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">冻结时长：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" placeholder="请输入冻结时长（小时）" class="form-control" id="freeze_time">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">冻结原因：</label>
			                                <div class="col-sm-8">
			                                    <textarea placeholder="请输入冻结原因" class="form-control form-textarea" id="freeze_why"></textarea>
			                                </div>
			                            </div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定" onclick="thaw(0)">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--冻结 end-->
		<!-- 解冻   -->
		<div id="myModal2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border float-pad">
								<div class="ibox-content">
									<form class="form-horizontal">
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户ID：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="thaw_id">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户昵称：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="thaw_nickname">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">剩余时长：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="freezethaw_time">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">冻结原因：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="freezethaw_why">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">操作：</label>
			                                <div class="col-sm-8">
			                                    <select class="form-control form-consele" id="thaw_type">
												   <option value="0">解冻</option>
												   <option value="1">修改时间</option>
												</select>
			                                    <input type="text" class="form-control form-conselein" placeholder="小时" id="thaw_time">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">解冻原因：</label>
			                                <div class="col-sm-8">
			                                    <textarea placeholder="请输入解冻原因" class="form-control form-textarea" id="thaw_why"></textarea>
			                                </div>
			                            </div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定" onclick="freeze(1)">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--解冻 end-->
		
		<!-- 冻结   -->
		<div id="myModal3" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border float-pad">
								<div class="ibox-content">
									<form class="form-horizontal">
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户ID：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="banned_id">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户昵称：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="banned_nickname">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">封禁时长：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" placeholder="请输入封禁时长（小时）" class="form-control" id="banned_length" >
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">封禁原因：</label>
			                                <div class="col-sm-8">
			                                    <textarea placeholder="请输入封禁原因" class="form-control form-textarea" id="why"></textarea>
			                                </div>
			                            </div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定" onclick="banned()">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--冻结 end-->
		<!-- 解冻   -->
		<div id="myModal4" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border float-pad">
								<div class="ibox-content">
									<form class="form-horizontal">
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户ID：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="unlock_id" >
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户昵称：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="unlock_nickname" >
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">剩余封禁时长：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="unlock_time" >
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">封禁原因：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="unlock_why" >
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">操作：</label>
			                                <div class="col-sm-8">
			                                    <select class="form-control form-consele" id ="unlock_type">
												   <option value="0">解封</option>
												   <option value="1">修改时间</option>
												</select>
			                                    <input type="text" class="form-control form-conselein" placeholder="小时" id="unlock_save_time">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">解封原因：</label>
			                                <div class="col-sm-8">
			                                    <textarea placeholder="请输入解封原因" class="form-control form-textarea" id="unlock_reason"></textarea>
			                                </div>
			                            </div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定" onclick="unlock()">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--解冻 end-->
		
		<!-- 修改   -->
		<div id="myModal5" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border float-pad">
								<div class="ibox-content">
									<form class="form-horizontal">
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户ID：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="save_id">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">用户昵称：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="save_nickname">
			                                </div>
			                            </div>

			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">当前购买钻：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" readonly="readonly" id="Purchase_drill">
			                                </div>
			                            </div>
			                            <div class="form-group">
			                                <label class="col-sm-2 control-label">修改购买钻：</label>
			                                <div class="col-sm-8">
			                                    <input type="text" value="" class="form-control" id="save_Purchase_drill" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
			                                </div>
			                            </div>
										<div class="form-group">
											<label class="col-sm-2 control-label">当前赠送钻：</label>
											<div class="col-sm-8">
												<input type="text" value="" class="form-control" readonly="readonly" id="Gift_drill">
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-2 control-label">修改赠送钻：</label>
											<div class="col-sm-8">
												<input type="text" value="" class="form-control" id="save_Gift_drill" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
											</div>
										</div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定" onclick="save_player_message()">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--修改end-->
		
		<!-- 修改   -->
		<div id="myModal6" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border">
								<div class="ibox-content">
									<form class="form-horizontal">
										<div class="gam_bg">
											<div class="gam_bgnr">
												<span>亲友圈名称</span>
											</div>
											<div class="gam_bgnr">
												<span>金币数量</span>
											</div>
										</div>
										<div  id="club_gold">
											<!-- <div class="gam_bgnr2">
												<span>亲友圈名称</span>
											</div>
											<div class="gam_bgnr2">
												<span>金币数量</span>
											</div> -->
										</div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-title">
								<h5>金币总数：<sapn id="gold"></sapn></h5>
							</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--修改end-->
		<!-- 修改   -->
		<div id="myModal7" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div id="gray_Nr">
				<div class="col-sm-6 col-tc-whi">
					<div class="ibox float-e-margins float-e-margins-2">
						<div class="ibox-title">
							<h5>提示消息</h5>
							<div class="ibox-tools" data-dismiss="modal">
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="panel-body">
							<div class="ibox float-e-margins float-e-border">
								<div class="ibox-content">
									<form class="form-horizontal">
										<div class="gam_bg">
											<div class="gam_bgnrt5">
												<span>亲友圈名称</span>
											</div>
											<div class="gam_bgnrt5">
												<span>加入时间</span>
											</div>
											<div class="gam_bgnrt5">
												<span>亲友圈身份</span>
											</div>
											<div class="gam_bgnrt5">
												<span>会员卡</span>
											</div>
											<div class="gam_bgnrt5">
												<span>会员到期时间</span>
											</div>
										</div>
										<div id="affiliated_club">
										<!-- <div class="gam_bg">
											<div class="gam_bgnrt2">
												<span>亲友圈名称</span>
											</div>
											<div class="gam_bgnrt2">
												<span>金币数量</span>
											</div>
											<div class="gam_bgnrt2">
												<span>金币数量</span>
											</div>
										</div>
										<div class="gam_bg" ">
											<div class="gam_bgnrt2">
												<span>亲友圈名称</span>
											</div>
											<div class="gam_bgnrt2">
												<span>金币数量</span>
											</div>
											<div class="gam_bgnrt2">
												<span>金币数量</span>
											</div>
										</div> -->
									</div>
			                        </form>
								</div>
							</div>
						</div>
						<div class="ibox-butz">
							<input class="btn btn-w-m btn-info" type="button" value="确定">
							<input class="btn btn-w-m" type="button" data-dismiss="modal" value="取消">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--修改end-->
<!--手机导航-->
<div class="to-fdh" style="display: none;">
	<img class="to-imgd" src="__STATIC__/img/phonedh.jpg">
	<div class="mob-nrlb">
		<ul>
			<li>
				<a class="mob-nrdh">管理</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('Player/gameplayer')}">玩家管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('system/notice')}">公告管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('email/mail')}">邮件管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Club/club')}">亲友圈管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Money/money')}">提现管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Order/order')}">订单管理</a>
					</li>
				</ul>
			</li>
			<li>
				<a class="mob-nrdh">数据</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('data/datagk')}">概況</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datawf')}">玩法</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datalc')}">留存</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datass')}">实时数据</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/dataczfx')}">充值分析</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/dataclub')}">亲友圈统计</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/president')}">高级会长</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/regionaldata')}">地区数据</a>
					</li>
				</ul>
			</li>
			<li>
				<a class="mob-nrdh mob-qbh">权限</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('rule/rule_list')}">权限管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('rule/rule_group')}">用户组管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('account/account_details')}">后台账号管理</a>
					</li>
				</ul>
			</li>
		</ul>
	</div>
</div>
<div id="zkbg">
	<img src="__STATIC__/img/dp.gif">
</div>
<div class="vnl-zz" style="display:none">
	<div><img src="__STATIC__/img/bqhp.gif"></div>
</div>
<!--手机适配-->
		<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
		<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="__STATIC__/js/plugins/peity/jquery.peity.min.js"></script>
		<script src="__STATIC__/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
		<script src="__STATIC__/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
		<script src="__STATIC__/js/content.js?v=1.0.0"></script>
		<script src="__STATIC__/js/plugins/laydate/laydate.js"></script>
		<script>
            //手机适配
            $(function(){
                if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
                    $("head").append("<link>");
                    var css = $("head").children(":last");
                    css.attr({
                        rel:  "stylesheet",
                        type: "text/css",
                        href: "__STATIC__/css/phone_sp.css"
                    });
                    var mql = window.matchMedia("(orientation: portrait)");
                    if(mql.matches) { //竖屏样式
                        $(".vnl-zz").show();
                        $(".to-fdh").hide();
                    }else{
                        $(".to-fdh").show();
                        $("html").width("100%");
                        $("body").width("100%");
                    }
                    mql.addListener(function(m) {
                        if(m.matches) {
                            // 改变到直立方向
                            $(".vnl-zz").show();
                            $(".to-fdh").hide();
                        }
                        else {
                            $(".to-fdh").show();
                            $(".vnl-zz").hide();
                            $("html").width("100%");
                            $("body").width("100%");
                        }
                    });
                }
            });
            //导航显示展开
            $(".mob-nrdh").click(function(){
                $(this).next().toggle(".mob-nryc");
            });
            $(".to-imgd").click(function(){
                $(this).next().toggle(".mob-nrlb");
            });
            //手机适配end
		// var id = $("#id").val();
		// var nickname = $("#nickname").val();

		 function _getMessage(t) {
			var nickname = $(t).parent().parent().children().eq(0).html();
			var id = $(t).parent().parent().children().eq(1).html();
			var unlock_time = $(t).parent().parent().children().eq(14).html();
			var unlock_why = $(t).parent().parent().children().eq(13).html();
			var f_time = $(t).parent().parent().children().eq(12).html();
			var f_why = $(t).parent().parent().children().eq(11).html();

			$('#freeze_id').val(id);
			$('#freeze_nickname').val(nickname);
			$('#banned_id').val(id);
			$('#banned_nickname').val(nickname);
			$('#unlock_id').val(id);
			$('#unlock_nickname').val(nickname);
			$('#unlock_time').val(unlock_time);
			$('#unlock_why').val(unlock_why);

			$('#thaw_id').val(id);
			$('#thaw_nickname').val(nickname);
			$('#freezethaw_time').val(f_time);
			$('#freezethaw_why').val(f_why);
		}
		
		//所属亲友圈 详情
		function affiliated_club(t){
			$("#affiliated_club").html("");
			var id= $(t).parent().parent().children().eq(1).html();
			$.ajax({
					type: "post",
					url: "__URL__/affiliated_",
					data: {
						'id':id,
					},
					dataType: "json",
					success: function(e) {
						console.log(e);
						for(i in e){
							if(e[i].President == 0){
								var President ="成员";
							}else{
								var President ="会长";
							}
							$("#affiliated_club").append('<div class="gam_bg"><div class="gam_bgnrt6"><span>'+e[i].club_name+'</span></div><div class="gam_bgnrt6"><span>'+e[i].create_time+'</span></div><div class="gam_bgnrt6"><span>'+President+'</span></div><div class="gam_bgnrt6"><span>'+e[i].vip_name+'</span></div><div class="gam_bgnrt6"><span>'+e[i].end_day+'</span></div></div>');
						}
					},
					error: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
					}
				});
		}
		//当前金币数 详情
		function gold(t){
			$("#club_gold").html("");
			var id= $(t).parent().parent().children().eq(1).html();
			var gold= $(t).parent().parent().children().eq(6).html();
			$("#gold").html(gold);
			   $.ajax({
					type: "post",
					url: "__URL__/gold",
					data: {
						'id':id,
					},
					dataType: "json",
					success: function(e) {

						// console.log(e);
						for(i in e){
							$("#club_gold").append('<div class="gam_bg"><div class="gam_bgnr2"><span>'+e[i].club_name+'</span></div><div class="gam_bgnr2"><span>'+e[i].gold_num+'</span></div></div>');
							$("#myModal6").modal("show");
						}
						
							
						// $("#button_gold").css('data-target="#myModal6"');
					},
					error: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
					}
				});
		}
		//修改信息 所属亲友圈展示
		function save_message(t){
				var Purchase_drill = $(t).parent().parent().children().eq(4).html();
				var Gift_drill = $(t).parent().parent().children().eq(5).html();
				var nickname = $(t).parent().parent().children().eq(0).html();
				var id = $(t).parent().parent().children().eq(1).html();
				$('#save_nickname').val(nickname);
				$('#save_id').val(id);
				$('#Purchase_drill').val(Purchase_drill);
				$('#Gift_drill').val(Gift_drill);

					
		};
		//营销账号 封禁
		function banned(){
				
				$.ajax({
					type: "post",
					url: "__URL__/banned",
					data: {
						'id':$('#banned_id').val(),
						'banned_length':$('#banned_length').val(),
						'why':$('#why').val(),
						'operation_object':$('#banned_nickname').val(),
					},
					dataType: "json",
					success: function(e) {
						// var json = eval("("+e+")");
						alert(e.msg);
						location.reload();
					},
					error: function(e) {
						console.log(e);
						var json = eval("("+e+")");
					}
				});
		}
		//营销账号 解封
		function unlock(){
			var Data={
		          unlock_id:$("#unlock_id").val(),
		          unlock_nickname:$("#unlock_nickname").val(),
		          unlock_time:$("#unlock_time").val(),
		          unlock_why:$("#unlock_why").val(),
		          unlock_type:$("#unlock_type").val(),
		          unlock_save_time:$("#unlock_save_time").val(),
		          unlock_reason:$("#unlock_reason").val(),
		    };
				
				$.ajax({
					type: "post",
					url: "__URL__/unlock",
					data: {
						'id':Data.unlock_id,
						'unlock_type':Data.unlock_type,
						'unlock_save_time':Data.unlock_save_time,
						'unlock_reason':Data.unlock_reason,
						'operation_object':Data.unlock_nickname

					},
					dataType: "json",
					success: function(e) {
						// console.log(e);
						// var json = eval("("+e+")");
						alert(e.msg);
						location.reload();
					},
					error: function(e) {
						console.log(e);
						var json = eval("("+e+")");
					}
				});
		}

		//游戏账号 冻结
		function thaw(t){
				var Data={
		          freeze_id:$("#freeze_id").val(),
		          freeze_nickname:$("#freeze_nickname").val(),
		          freeze_time:$("#freeze_time").val(),
		          freeze_why:$("#freeze_why").val(),
		          freeze_status:t,
		    	};
				$.ajax({
					type: "post",
					url: "__URL__/thaw",
					data: {
						'uid':Data.freeze_id,
						'player_status':Data.freeze_status,
						'seal_up_duration':Data.freeze_time,
						'annotate':Data.freeze_why,
						'operation_object':$('#freeze_nickname').val(),

					},
					dataType: "json",
					success: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
						alert(e.msg);
						location.reload();
					},
					error: function(e) {
						console.log(e);
						var json = eval("("+e+")");
					}
				});
		}
		//游戏账号 解封
		function freeze(){
				var Data={
		          thaw_id:$("#thaw_id").val(),
		          thaw_nickname:$("#thaw_nickname").val(),
		          thaw_time:$("#thaw_time").val(),
		          thaw_why:$("#thaw_why").val(),
		          thaw_type:$("#thaw_type").val(),
		    	};
		    	if(Data.thaw_time == ""){
		    		var time = 0;
		    	}else{
		    		var time = Data.thaw_time ;
		    	}
				$.ajax({
					type: "post",
					url: "__URL__/freeze",
					data: {
						'uid':Data.thaw_id,
						'player_status':Data.freeze_status,
						'seal_up_duration':time,
						'type':Data.thaw_type,
						'annotate':Data.thaw_why,
						'operation_object':$('#thaw_nickname').val(),

					},
					dataType: "json",
					success: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
						alert(e.msg);
						location.reload();
					},
					error: function(e) {
						console.log(e);
						var json = eval("("+e+")");
					}
				});
		}
		//用户信息修改
		function save_player_message(){
				var Data={
					save_id:$("#save_id").val(),
                    Purchase_drill:$('#save_Purchase_drill').val(),
                    Gift_drill:$('#save_Gift_drill').val(),
                	Purchase:$('#Purchase_drill').val(),
                    Gift:$('#Gift_drill').val(),
		    	};
        		if(Data.Gift_drill == ""){
                	var Gift_drill = Data.Gift;
                }else{
                	var Gift_drill = Data.Gift_drill;
                }
       		 	if(Data.Purchase_drill == ""){
                	var Purchase_drill = Data.Purchase;
                }else{
                	var Purchase_drill = Data.Purchase_drill;
                }
				console.log(Data);
                $.ajax({
					type: "post",
					url: "__URL__/save_player_message",
					data: {
						'id':Data.save_id,
						'Purchase_drill':Purchase_drill,
						'Gift_drill':Gift_drill,

					},
					dataType: "json",
					success: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
						alert(e.msg);
						location.reload();
					},
					error: function(e) {
						console.log(e);
						// var json = eval("("+e+")");
					}
				});
				
		}
		$('#buttonid').on('click', function() {     //页面上的button按钮的click事件，重新获取参数后发送参数，然后重新加载数据。
		   		var uid = $("#uid").val();
				var nickname = $("#nickname").val();
				if(uid == "" && nickname == ""){
					alert("请至少输入一个筛选条件");
					return false;
				}
                $("#table_list_1").jqGrid('setGridParam',{
                	url:'__URL__/player_message',
                    datatype:'json',
                    postData:{'uid':uid,'nickname':nickname},
                    page:1
                }).trigger("reloadGrid"); //重新载入

           	 	// var re_records = $("#table_list_1").jqGrid('getGridParam', 'records'); //获取数据总条数
				// if(re_records == 0) {
				// 	alert("用户信息不存在");
				// }
			 });
        $(document).ready(function () {

            $.jgrid.defaults.styleUI = 'Bootstrap';
            // Examle data for jqGrid

            $("#table_list_1").jqGrid({
                // url:'__URL__/player_message',
                postData:{},
                mtype: 'POST',
                datatype: "json",
                height: 450,
                autowidth: true,
                shrinkToFit: true,
                rowNum: 20,
                rowList: [20,50,100],
                colNames: ['用户昵称', '用户ID', '账号注册时间', '最后登录时间', '购买蓝钻', '免费蓝钻','累计蓝钻充值数','余额','所属亲友圈','游戏账号状态','营销账号状态',"冻结原因","冻结时长",'封禁原因','封禁时长','修改信息'],
                colModel: [
                    {
                        name: 'nickname',
                        index: 'nickname',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'uid',
                        index: 'uid',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'create_time',
                        index: 'create_time',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'last_login_time',
                        index: 'last_login_time',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'Purchase_drill',
                        index: 'Purchase_drill',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'Gift_drill',
                        index: 'Gift_drill',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },

                    {
                        name: 'recharge',
                        index: 'recharge',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },
                    {
                        name: 'Balance',
                        index: 'Balance',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        align:'center'
                    },

                    {
						name: 'isfinish',
						index: 'isfinish',
						width: 60,
						formatter: function() {
							return '<input type="button" value="详情" data-toggle="modal" data-target="#myModal7" class="btn btn-info" onclick="affiliated_club(this)"/>';
						},
                        align:'center'
					},
                    {
						name: 'player_status',
						index: 'player_status',
						width: 60,
						formatter: function(player_status) {
							switch(Number(player_status)){
									case 0:
										return '<input type="button" value="解冻" data-toggle="modal" data-target="#myModal2" id="jd" class="btn btn-danger" onclick="_getMessage(this)"/>'
									case 1:
										return '<input type="button" value="冻结" id="dj" class="btn btn-info" data-toggle="modal" data-target="#myModal" onclick="_getMessage(this)"/>'
								}
							// return '<input type="button" value="解冻" data-toggle="modal" data-target="#myModal2" id="jd" class="btn btn-danger"/><input type="button" value="冻结" id="dj" class="btn btn-info" data-toggle="modal" data-target="#myModal"/>';
						},
                        align:'center'
					},
                    {
						name: 'state',
						index: 'state',
						width: 60,
						formatter: function(state) {
							switch(Number(state)){
									case 0:
										return '<input type="button" value="解封" id="jj" data-toggle="modal" data-target="#myModal4" class="btn btn-danger" onclick="_getMessage(this)"/>'
									case 1:
										return '<input type="button" value="封禁" id="fj" data-toggle="modal" data-target="#myModal3" class="btn btn-info" onclick="_getMessage(this)"/>'
								}
							// return '<input type="button" value="封禁" id="fj" data-toggle="modal" data-target="#myModal3" class="btn btn-info"/><input type="button" value="解封" id="jj" data-toggle="modal" data-target="#myModal4" class="btn btn-danger"/>';
						},
                        align:'center'
					},
                    {
                        name: 'annotate',
                        index: 'annotate',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
						hidden:true,
                        align:'center'
                    },
                    {
                        name: 'freeze_remaining_time',
                        index: 'freeze_remaining_time',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        hidden:true,
                        align:'center'
                    },
                    {
                        name: 'why',
                        index: 'why',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        hidden:true,
                        align:'center'
                    },
                    {
                        name: 'banned_length',
                        index: 'banned_length',
                        width: 60,
                        sorttype: "int",
                        sortable: false,
                        hidden:true,
                        align:'center'
                    },
                    {
						name: 'auth_group',
						index: 'auth_group',
						width: 60,
						formatter: function(auth_group) {
                        	switch(Number(auth_group)){
									case 0:
										return ''
									case 1:
										return '<input type="button" value="修改" id="" data-toggle="modal" data-target="#myModal5" class="btn btn-info" onclick="save_message(this)"/>';
							}
							
						},
                        align:'center'
					}
                ],
                pager: "#pager_list_1",
                viewrecords: true,
                loadonce: true,
                caption: "玩家管理",
                hidegrid: false
            });
            $("#jd").hide();
            $(function(){
            	$("#jd").click(function(){
            		$("#jd").hide();
            		$("#dj").show();
            	});
            	$("#dj").click(function(){
            		$("#dj").hide();
            		$("#jd").show();
            	});
            });
            $("#fj").hide();
            $(function(){
            	$("#fj").click(function(){
            		$("#fj").hide();
            		$("#jj").show();
            	});
            	$("#jj").click(function(){
            		$("#jj").hide();
            		$("#fj").show();
            	});
            });
            $('.form-conselein').hide();
			$('.form-consele').on('change',function(){
				if ($('.form-consele').val() == '0') {
					$('.form-conselein').hide();
				} else{
					$('.form-conselein').show();
				}
			})
			$('#unlock_type').on('change',function(){
				if ($('#unlock_type').val() == '0') {
					$('#unlock_save_time').hide();
				} else{
					$('#unlock_save_time').show();
				}
			})
			setTimeout(function(){
                var width = $('.jqGrid_wrapper').width();
                $('#table_list_1').setGridWidth(width);
			},500);
			
		    laydate.render({
		      elem: '#time1'
		      ,range: true
		    });
		    laydate.render({
		      elem: '#time2'
		      ,range: true
		    });
		    
		    
		    
        });
    </script>


	</body>

</html>